<?php
/**
 * KYAPIService.php
 * description:
 * Created by www.
 * User: SCF
 * Date: 2018/11/1 14:52
 *
 */
namespace App\Services\ThirdAPI;

use Illuminate\Support\Facades\Log;
use common\utils\SysCode;

class LEGAPIService
{
    protected $apiName="leg";
    /**
     * 代理商获取玩家游戏下注数据或总社获取玩家游戏下注日志   OK
     * @param $startTime
     * @param $endTime
     * @return mixed
     * @throws \Exception
     */
    function getOrders($startdate, $enddate){
        $data = [
            'api_name' => $this->apiName,
            'start_time' => $startdate,
            'end_time' => $enddate,
        ];
        $url = config('app.rpcserver')  . "/api/getOrders";
        $result = GameApiService::request($url,'get',$data);
        amount_format_array($result['list'],['bet_money','prize_money','winloss_money','contribute_money','bonus_money','valid_money'],true);
        return $result;
    }
}